home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / networking / 1094 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.9 KB

  1. Path: bignews.cycor.ca!usenet
  2. From: dgrant@dgrant.peinet.pe.ca (Dennis Grant)
  3. Newsgroups: comp.sys.amiga.networking
  4. Subject: Re: Reading Web pages with AREXX
  5. Date: 4 Feb 1996 20:24:40 GMT
  6. Organization: Private Internet Connection
  7. Distribution: world
  8. Message-ID: <4f34m8$et6@storm.cycor.ca>
  9. References: <4eoduk$cmi@storm.cycor.ca> <ehb.01om@draco.prima.ruhr.de>
  10. NNTP-Posting-Host: dgrant.peinet.pe.ca
  11. Mime-Version: 1.0
  12. Content-Type: text/plain; charset=iso-8859-1
  13. Content-Transfer-Encoding: 8bit
  14. X-NewsSoftware: GRn 2.1 Feb 19, 1994
  15.  
  16. In article <ehb.01om@draco.prima.ruhr.de> ehb@draco.prima.ruhr.de (Edwin H. Bielawski) writes:
  17. > In article <4eoduk$cmi@storm.cycor.ca> dgrant@peinet.pe.ca (Dennis Grant) writes:
  18. > >I had a nifty idea, but I need some help with it.
  19. > >
  20. > >I need an AREXX function that takes a URL as an input, and returns the text
  21. > >of that web page.
  22. > Have a look to http://Snark.apana.org.au/james/GetURL/
  23.  
  24.  
  25. I did, and it works! So now I have a little AREXX cron job that pulls the
  26. current prices of my mutual funds down from the web, and tells me how much
  27. money I made. :)
  28.  
  29. Here's the source -
  30.  
  31. /*Money.rexx*/
  32. /*A program to calculate the value of mutual funds*/
  33.  
  34. ADDRESS COMMAND
  35.  
  36. 'rx geturl.rexx http://www.trimark.com/Trimark/html/fundsdetail.html -output t:trimark'
  37.  
  38. 'grep HREF="159.html" t:trimark >t:america'
  39. nil = Open('america','t:america',READ)
  40. buffer = READLN('america')
  41. acm = RIGHT(buffer,4)
  42. total = acm * 561.994
  43. nil = Close('america')
  44. 'delete t:america >NIL:'
  45.  
  46. 'grep HREF="157.html" t:trimark > t:SelBal'
  47. nil = Open('selbal','t:selbal',READ)
  48. buffer = READLN('selbal')
  49. acm = RIGHT(buffer,4)
  50. grandtotal = total
  51. total = acm * 379.465
  52. grandtotal = grandtotal + total
  53. nil = Close('selbal')
  54. 'delete t:selbal >NIL:'
  55.  
  56. 'grep HREF="158.html" t:trimark > t:SelGth'
  57. nil = Open('selgth','t:selgth',READ)
  58. buffer = READLN('selgth')
  59. acm = RIGHT(buffer,4)
  60. total = acm * 1734.698
  61. grandtotal = grandtotal + total
  62. nil = Close('selgth')
  63. 'delete t:selgth >NIL:'
  64. 'delete t:trimark >NIL:'
  65.  
  66. 'rx geturl.rexx http://www.cifunds.com/prices.html -output t:ci'
  67. 'grep "Latin American Fund" t:ci >t:latin'
  68. nil = Open('latin','t:latin',READ)
  69. buffer = READLN('latin')
  70. acm = RIGHT(buffer,4)
  71. total = acm * 445.633
  72. grandtotal = grandtotal + total
  73. nil = Close('latin')
  74. 'delete t:ci >NIL:'
  75. 'delete t:latin >NIL:'
  76.  
  77. 'rx geturl.rexx http://www.agf.com/fundinfo/prices/cdnpri.html -output t:agf'
  78. 'grep "ASIAN GROWTH" t:agf >t:asgth'
  79. nil = Open('asgth','t:asgth',READ)
  80. buffer = READLN('asgth')
  81. tacm = LEFT(buffer,128)
  82. acm = RIGHT(tacm,5)
  83. total = acm * 533.480
  84. grandtotal = grandtotal + total
  85. SAY 'The value today is: $' grandtotal
  86. nil = Close('asgth')
  87. 'delete t:agf >NIL:'
  88. 'delete t:asgth >NIL:'
  89.  
  90. nil = OPEN('out','down:fundsgraph',APPEND)
  91. nil = WRITELN('out',grandtotal)
  92. nil = Close('out')
  93.  
  94. 'delete t:header#? >:NIL'
  95. 'delete t:prune#? >NIL:'
  96.  
  97.  
  98.  
  99. -- 
  100. --------------------------
  101. Dennis Grant
  102. dgrant@cycor.ca
  103. http://www.cycor.ca/TCave/
  104.